create or replace view vac_app_bc_templates_4_1 as
with bc as
(
  select
    workspace,
    workspace_display_name,
    application_id,
    application_name,
    theme_number,
    theme_class,
    template_name,
    before_first,
    current_page_option,
    non_current_page_option,
    breadcrumb_link_attributes,
    between_levels,
    after_last,
    to_char(max_levels) max_levels,
    start_with,
    is_subscribed,
    subscribed_from,
    last_updated_by,
    last_updated_on,
    translatable,
    component_comments,
    breadcrumb_template_id
  from apex_application_temp_bc
 )
select
    workspace,
    workspace_display_name,
    application_id,
    application_name,
    last_updated_by,
    last_updated_on,
    breadcrumb_template_id,
    theme_number,
    template_name,
    u_name,
    u_value,
    'APEX_APPLICATION_TEMP_BC' src_view_name
from bc
UNPIVOT INCLUDE NULLS(u_value FOR u_name IN
 (
    theme_class,
    before_first,
    current_page_option,
    non_current_page_option,
    breadcrumb_link_attributes,
    between_levels,
    after_last,
    max_levels,
    start_with,
    is_subscribed,
    subscribed_from,
    translatable,
    component_comments
 )
);

